package cn.com.header.web.controller;



import com.google.gson.Gson;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * 作品抽查
 * @author fengnuoyang
 *
 */
@Controller
@RequestMapping("test")
public class TestController {

	@RequestMapping(value = "index")
	public String index(Model model, HttpServletRequest request){

		List<Map<String,Object>> mapList=new ArrayList<Map<String,Object>>();
		Map<String,Object> map=new HashMap<>();
		map.put("name","一年级");
		map.put("subject1","yang");
		map.put("subject2","yyf");
		mapList.add(map);
		map=new HashMap<>();
		map.put("name","二年级");
		map.put("subject1","feng");
		map.put("subject2","nuo");
		mapList.add(map);
		request.setAttribute("mapList",mapList);

		return "test/index";
	}
	@RequestMapping(value = "qiye")
	public String qiye(Model model){
		return "test/qiye";
	}

	@RequestMapping(value = "validate")
	public String validate(Model model){
		return "test/validate";
	}


}
